3.15 \(\int \cos (c+d x) (a+i a \tan (c+d x)) \, dx\)

Optimal. Leaf size=26 \[ \frac{a \sin (c+d x)}{d}-\frac{i a \cos (c+d x)}{d} \]

[Out]

((-I)*a*Cos[c + d*x])/d + (a*Sin[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.020528, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {3486, 2637} \[ \frac{a \sin (c+d x)}{d}-\frac{i a \cos (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]*(a + I*a*Tan[c + d*x]),x]

[Out]

((-I)*a*Cos[c + d*x])/d + (a*Sin[c + d*x])/d

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \cos (c+d x) (a+i a \tan (c+d x)) \, dx &=-\frac{i a \cos (c+d x)}{d}+a \int \cos (c+d x) \, dx\\ &=-\frac{i a \cos (c+d x)}{d}+\frac{a \sin (c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.0198565, size = 51, normalized size = 1.96 \[ \frac{i a \sin (c) \sin (d x)}{d}-\frac{i a \cos (c) \cos (d x)}{d}+\frac{a \sin (c) \cos (d x)}{d}+\frac{a \cos (c) \sin (d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]*(a + I*a*Tan[c + d*x]),x]

[Out]

((-I)*a*Cos[c]*Cos[d*x])/d + (a*Cos[d*x]*Sin[c])/d + (a*Cos[c]*Sin[d*x])/d + (I*a*Sin[c]*Sin[d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.036, size = 24, normalized size = 0.9 \begin{align*}{\frac{-ia\cos \left ( dx+c \right ) +a\sin \left ( dx+c \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*(a+I*a*tan(d*x+c)),x)

[Out]

1/d*(-I*a*cos(d*x+c)+a*sin(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.10954, size = 30, normalized size = 1.15 \begin{align*} \frac{-i \, a \cos \left (d x + c\right ) + a \sin \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+I*a*tan(d*x+c)),x, algorithm="maxima")

[Out]

(-I*a*cos(d*x + c) + a*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.13935, size = 32, normalized size = 1.23 \begin{align*} -\frac{i \, a e^{\left (i \, d x + i \, c\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+I*a*tan(d*x+c)),x, algorithm="fricas")

[Out]

-I*a*e^(I*d*x + I*c)/d

________________________________________________________________________________________

Sympy [A]  time = 0.231601, size = 26, normalized size = 1. \begin{align*} \begin{cases} - \frac{i a e^{i c} e^{i d x}}{d} & \text{for}\: d \neq 0 \\a x e^{i c} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+I*a*tan(d*x+c)),x)

[Out]

Piecewise((-I*a*exp(I*c)*exp(I*d*x)/d, Ne(d, 0)), (a*x*exp(I*c), True))

________________________________________________________________________________________

Giac [B]  time = 1.15785, size = 113, normalized size = 4.35 \begin{align*} -\frac{4 i \, a e^{\left (i \, d x + i \, c\right )} + a \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + a \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - a \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - a \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right )}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+I*a*tan(d*x+c)),x, algorithm="giac")

[Out]

-1/4*(4*I*a*e^(I*d*x + I*c) + a*log(I*e^(I*d*x + I*c) + 1) + a*log(I*e^(I*d*x + I*c) - 1) - a*log(-I*e^(I*d*x
+ I*c) + 1) - a*log(-I*e^(I*d*x + I*c) - 1))/d